package dgo.interval;
import dgo.Callback;

public class Pause extends Interval{
  private Callback _callback;
  private Object _argument;
 

  public Pause(Callback callback){
    this.duration = 1;
    _callback = callback;
    _argument = null;
  }
  
  public Pause(Callback callback, Object arguments){
    this.duration = 1;
    _callback = callback;
    _argument = arguments;
  }
  
  public boolean call(IntervalNode node){
    if(_callback == null){return true;}

    return _callback.call(_argument);
  }
}
